package com.muyi;

import com.muyi.app.UserService;
import com.muyi.spring.AnnotationConfigApplicationContext;

public class App
{
    public static void main( String[] args )
    {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

        UserService service = (UserService) context.getBean("userServiceImpl");
        service.test();

        System.out.println("-----");

        System.out.println(context.getBean("prototypeBean"));
        System.out.println(context.getBean("prototypeBean"));

        System.out.println("-----");

        System.out.println(context.getBean("tbean"));

    }
}
